package com.itcast.order.handler;

import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 订单相关定时任务
 *
 * @author itcast
 * @create 2023/9/2 16:44
 **/
@Slf4j
@Component
public class OrdersHandler {
    /**
     * 支付超时取消订单
     * 每分钟执行一次
     */
    @XxlJob(value = "cancelOverTimePayOrder")
    public void cancelOverTimePayOrder() {
        //查询支付超时状态订单

        //遍历取消订单
    }

    /**
     * 订单退款异步任务
     */
    @XxlJob(value = "handleRefundOrders")
    public void handleRefundOrders() {
        //查询退款中订单

        //遍历，调用第三方进行退款

        //根据退款状态处理订单相关信息

    }

    /**
     * 套餐销量计数
     */
    @XxlJob(value = "setmealSaleStatistics")
    public void setmealSaleStatistics() {
    }
}
